package org.tau.workshop2011.parsing.AST

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import org.tau.workshop2011.dynamic.RuntimeEnvironment
import org.tau.workshop2011.expressions.Type

case class Negation(expr: DirectExpr) extends DirectExpr {

  expr.parent = this

  override def autoResolveType {
    super.resolveTypeTo(Type.tBoolean)
    expr resolveTypeTo Type.tBoolean
  }

  override def accept(visitor: ASTVisitor): Any = visitor.visit(this)

  override def toString = "!" + "(" + expr + ")"
}
